package com.example.healthcondition.mapper;

import com.example.healthcondition.entity.HealthReports;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Options;

@Mapper
public interface HealthReportsMapper {
    @Insert("INSERT INTO healthreports (user_id, report_date, overall_health, recommendations) " +
            "VALUES (#{userId}, #{reportDate}, #{overallHealth}, #{recommendations})")
    @Options(useGeneratedKeys = true, keyProperty = "reportId")
    int insertHealthReport(HealthReports healthReport);
}
